package HLLibClasses;

import HLCode.HLClassManager;
import HLCode.HLLibClass;
import HLCode.HLObject;
import HLLib.base.HLGraphics;
import HLLib.base.HLImage;
import HLLib.base.HLIntList;
import HLLib.base.HLList;
import HLLib.base.HLString;

public class HLClassGraphics extends HLLibClass {
    public HLClassGraphics(HLClassManager owner) {
        super(owner);
    }

    public HLObject NewObject() {
        return new HLGraphics();
    }

    public void Execute(HLObject self, int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            ((HLGraphics) self).Clear(args.GetInt(0));
            break;
        }
        case 1: {
            ((HLGraphics) self).ClearRect();
            break;
        }
        case 2: {
            ((HLGraphics) self).SetClip(args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3));
            break;
        }
        case 3: {
            ((HLGraphics) self).ClipRect(args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3));
            break;
        }
        case 4: {
            if (resultOwnerObject == null) {
                ((HLGraphics) self).GetClipX();
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLGraphics) self).GetClipX());
            }
            break;
        }
        case 5: {
            if (resultOwnerObject == null) {
                ((HLGraphics) self).GetClipY();
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLGraphics) self).GetClipY());
            }
            break;
        }
        case 6: {
            if (resultOwnerObject == null) {
                ((HLGraphics) self).GetClipWidth();
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLGraphics) self).GetClipWidth());
            }
            break;
        }
        case 7: {
            if (resultOwnerObject == null) {
                ((HLGraphics) self).GetClipHeight();
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLGraphics) self).GetClipHeight());
            }
            break;
        }
        case 8: {
            ((HLGraphics) self).DrawArc(args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5), args.GetInt(6));
            break;
        }
        case 9: {
            ((HLGraphics) self).DrawFrame2((HLImage)args.GetObject(0), (HLImage)args.GetObject(1), args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3));
            break;
        }
        case 10: {
            ((HLGraphics) self).DrawFrame3((HLImage)args.GetObject(0), (HLImage)args.GetObject(1), (HLImage)args.GetObject(2), args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3));
            break;
        }
        case 11: {
            ((HLGraphics) self).DrawFrame2Adjustable((HLImage)args.GetObject(0), (HLImage)args.GetObject(1), args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5), args.GetInt(6));
            break;
        }
        case 12: {
            ((HLGraphics) self).DrawFrame3Adjustable((HLImage)args.GetObject(0), (HLImage)args.GetObject(1), (HLImage)args.GetObject(2), args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5), args.GetInt(6));
            break;
        }
        case 13: {
            ((HLGraphics) self).DrawImage((HLImage)args.GetObject(0), args.GetInt(0), args.GetInt(1), args.GetInt(2));
            break;
        }
        case 14: {
            ((HLGraphics) self).DrawImageEX((HLImage)args.GetObject(0), args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetBoolean(0), args.GetInt(3), args.GetInt(4), args.GetInt(5), args.GetInt(6), args.GetInt(7), args.GetInt(8));
            break;
        }
        case 15: {
            ((HLGraphics) self).DrawImageEX1((HLImage)args.GetObject(0), args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5), args.GetInt(6), args.GetInt(7), args.GetInt(8));
            break;
        }
        case 16: {
            ((HLGraphics) self).DrawImageAdjustable((HLImage)args.GetObject(0), args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5));
            break;
        }
        case 17: {
            ((HLGraphics) self).DrawImageFillRect((HLImage)args.GetObject(0), args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4));
            break;
        }
        case 18: {
            ((HLGraphics) self).DrawImageFillRectEX((HLImage)args.GetObject(0), args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetBoolean(0), args.GetBoolean(1), args.GetInt(5), args.GetInt(6), args.GetInt(7), args.GetInt(8));
            break;
        }
        case 19: {
            if (resultOwnerObject == null) {
                ((HLGraphics) self).DrawImageString((HLList)args.GetObject(0), (char)args.GetInt(0), args.GetInt(1), (HLString)args.GetObject(1), args.GetInt(2), args.GetInt(3));
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLGraphics) self).DrawImageString((HLList)args.GetObject(0), (char)args.GetInt(0), args.GetInt(1), (HLString)args.GetObject(1), args.GetInt(2), args.GetInt(3)));
            }
            break;
        }
        case 20: {
            if (resultOwnerObject == null) {
                ((HLGraphics) self).DrawImageStringEX((HLList)args.GetObject(0), (char)args.GetInt(0), args.GetInt(1), (HLString)args.GetObject(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5), args.GetInt(6), args.GetInt(7), args.GetInt(8), args.GetInt(9), args.GetInt(10));
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLGraphics) self).DrawImageStringEX((HLList)args.GetObject(0), (char)args.GetInt(0), args.GetInt(1), (HLString)args.GetObject(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5), args.GetInt(6), args.GetInt(7), args.GetInt(8), args.GetInt(9), args.GetInt(10)));
            }
            break;
        }
        case 21: {
            if (resultOwnerObject == null) {
                ((HLGraphics) self).GetImageStringSizeEX((HLList)args.GetObject(0), args.GetInt(0), (HLString)args.GetObject(1), args.GetInt(1), args.GetInt(2), args.GetInt(3));
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLGraphics) self).GetImageStringSizeEX((HLList)args.GetObject(0), args.GetInt(0), (HLString)args.GetObject(1), args.GetInt(1), args.GetInt(2), args.GetInt(3)));
            }
            break;
        }
        case 22: {
            if (resultOwnerObject == null) {
                ((HLGraphics) self).DrawImageStringAdjustable((HLList)args.GetObject(0), (char)args.GetInt(0), args.GetInt(1), (HLString)args.GetObject(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5), args.GetInt(6));
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLGraphics) self).DrawImageStringAdjustable((HLList)args.GetObject(0), (char)args.GetInt(0), args.GetInt(1), (HLString)args.GetObject(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5), args.GetInt(6)));
            }
            break;
        }
        case 23: {
            if (resultOwnerObject == null) {
                ((HLGraphics) self).DrawImageNumberAdjustable((HLList)args.GetObject(0), (char)args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5), args.GetInt(6), args.GetInt(7));
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLGraphics) self).DrawImageNumberAdjustable((HLList)args.GetObject(0), (char)args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5), args.GetInt(6), args.GetInt(7)));
            }
            break;
        }
        case 24: {
            if (resultOwnerObject == null) {
                ((HLGraphics) self).DrawImageStringAdjustableEX((HLList)args.GetObject(0), (char)args.GetInt(0), args.GetInt(1), (HLString)args.GetObject(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5), args.GetInt(6), args.GetInt(7), args.GetInt(8), args.GetInt(9), args.GetInt(10), args.GetInt(11), args.GetInt(12), args.GetInt(13));
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLGraphics) self).DrawImageStringAdjustableEX((HLList)args.GetObject(0), (char)args.GetInt(0), args.GetInt(1), (HLString)args.GetObject(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5), args.GetInt(6), args.GetInt(7), args.GetInt(8), args.GetInt(9), args.GetInt(10), args.GetInt(11), args.GetInt(12), args.GetInt(13)));
            }
            break;
        }
        case 25: {
            if (resultOwnerObject == null) {
                ((HLGraphics) self).DrawImageNumberAdjustableEX((HLList)args.GetObject(0), (char)args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5), args.GetInt(6), args.GetInt(7), args.GetInt(8), args.GetInt(9), args.GetInt(10), args.GetInt(11), args.GetInt(12), args.GetInt(13), args.GetInt(14));
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLGraphics) self).DrawImageNumberAdjustableEX((HLList)args.GetObject(0), (char)args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5), args.GetInt(6), args.GetInt(7), args.GetInt(8), args.GetInt(9), args.GetInt(10), args.GetInt(11), args.GetInt(12), args.GetInt(13), args.GetInt(14)));
            }
            break;
        }
        case 26: {
            ((HLGraphics) self).DrawImageScale9Grid((HLImage)args.GetObject(0), args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5), args.GetInt(6), args.GetInt(7), args.GetInt(8), args.GetInt(9), args.GetInt(10), args.GetInt(11));
            break;
        }
        case 27: {
            ((HLGraphics) self).DrawLine(args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4));
            break;
        }
        case 28: {
            ((HLGraphics) self).DrawPolygonRim((HLIntList)args.GetObject(0), (HLIntList)args.GetObject(1), args.GetInt(0));
            break;
        }
        case 29: {
            ((HLGraphics) self).DrawRectRim(args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5));
            break;
        }
        case 30: {
            ((HLGraphics) self).DrawRegion((HLImage)args.GetObject(0), args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5));
            break;
        }
        case 31: {
            ((HLGraphics) self).DrawSinH((HLImage)args.GetObject(0), args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5));
            break;
        }
        case 32: {
            ((HLGraphics) self).DrawSinV((HLImage)args.GetObject(0), args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5));
            break;
        }
        case 33: {
            ((HLGraphics) self).DrawText((HLString)args.GetObject(0), args.GetInt(0), args.GetInt(1), args.GetInt(2));
            break;
        }
        case 34: {
            ((HLGraphics) self).DrawString((HLString)args.GetObject(0), args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4));
            break;
        }
        case 35: {
            ((HLGraphics) self).DrawStringAdjustable((HLString)args.GetObject(0), args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5), args.GetInt(6), args.GetInt(7));
            break;
        }
        case 36: {
            ((HLGraphics) self).DrawWave(args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5), args.GetInt(6), args.GetInt(7));
            break;
        }
        case 37: {
            ((HLGraphics) self).drawImageInWater((HLImage)args.GetObject(0), args.GetBoolean(0), args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5), args.GetInt(6), args.GetInt(7), args.GetInt(8));
            break;
        }
        case 38: {
            ((HLGraphics) self).FillArc(args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5), args.GetInt(6));
            break;
        }
        case 39: {
            ((HLGraphics) self).FillPolygon((HLIntList)args.GetObject(0), (HLIntList)args.GetObject(1), args.GetInt(0));
            break;
        }
        case 40: {
            ((HLGraphics) self).FillRect(args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4));
            break;
        }
        case 41: {
            ((HLGraphics) self).FillRectAlpha(args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4));
            break;
        }
        case 42: {
            ((HLGraphics) self).FillRoundRect(args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5), args.GetInt(6));
            break;
        }
        case 43: {
            ((HLGraphics) self).DrawRoundRect(args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5), args.GetInt(6));
            break;
        }
        case 44: {
            ((HLGraphics) self).SetFont(args.GetInt(0));
            break;
        }
        case 45: {
            ((HLGraphics) self).StoreClip();
            break;
        }
        case 46: {
            ((HLGraphics) self).RestoreClip();
            break;
        }
        }
    }

    public void StaticExecute(int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            if (resultOwnerObject == null) {
                HLGraphics.RGB(args.GetInt(0), args.GetInt(1), args.GetInt(2));
            } else {
                resultOwnerObject.SetInt(resultIndex, HLGraphics.RGB(args.GetInt(0), args.GetInt(1), args.GetInt(2)));
            }
            break;
        }
        case 1: {
            if (resultOwnerObject == null) {
                HLGraphics.ARGB(args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3));
            } else {
                resultOwnerObject.SetInt(resultIndex, HLGraphics.ARGB(args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3)));
            }
            break;
        }
        case 2: {
            if (resultOwnerObject == null) {
                HLGraphics.GetAlpha(args.GetInt(0));
            } else {
                resultOwnerObject.SetInt(resultIndex, HLGraphics.GetAlpha(args.GetInt(0)));
            }
            break;
        }
        case 3: {
            if (resultOwnerObject == null) {
                HLGraphics.SetAlpha(args.GetInt(0), args.GetInt(1));
            } else {
                resultOwnerObject.SetInt(resultIndex, HLGraphics.SetAlpha(args.GetInt(0), args.GetInt(1)));
            }
            break;
        }
        case 4: {
            if (resultOwnerObject == null) {
                HLGraphics.GetRed(args.GetInt(0));
            } else {
                resultOwnerObject.SetInt(resultIndex, HLGraphics.GetRed(args.GetInt(0)));
            }
            break;
        }
        case 5: {
            if (resultOwnerObject == null) {
                HLGraphics.SetRed(args.GetInt(0), args.GetInt(1));
            } else {
                resultOwnerObject.SetInt(resultIndex, HLGraphics.SetRed(args.GetInt(0), args.GetInt(1)));
            }
            break;
        }
        case 6: {
            if (resultOwnerObject == null) {
                HLGraphics.GetGreen(args.GetInt(0));
            } else {
                resultOwnerObject.SetInt(resultIndex, HLGraphics.GetGreen(args.GetInt(0)));
            }
            break;
        }
        case 7: {
            if (resultOwnerObject == null) {
                HLGraphics.SetGreen(args.GetInt(0), args.GetInt(1));
            } else {
                resultOwnerObject.SetInt(resultIndex, HLGraphics.SetGreen(args.GetInt(0), args.GetInt(1)));
            }
            break;
        }
        case 8: {
            if (resultOwnerObject == null) {
                HLGraphics.GetBlue(args.GetInt(0));
            } else {
                resultOwnerObject.SetInt(resultIndex, HLGraphics.GetBlue(args.GetInt(0)));
            }
            break;
        }
        case 9: {
            if (resultOwnerObject == null) {
                HLGraphics.SetBlue(args.GetInt(0), args.GetInt(1));
            } else {
                resultOwnerObject.SetInt(resultIndex, HLGraphics.SetBlue(args.GetInt(0), args.GetInt(1)));
            }
            break;
        }
        case 10: {
            if (resultOwnerObject == null) {
                HLGraphics.GetColorBase(args.GetInt(0));
            } else {
                resultOwnerObject.SetInt(resultIndex, HLGraphics.GetColorBase(args.GetInt(0)));
            }
            break;
        }
        case 11: {
            if (resultOwnerObject == null) {
                HLGraphics.SetColorBase(args.GetInt(0), args.GetInt(1));
            } else {
                resultOwnerObject.SetInt(resultIndex, HLGraphics.SetColorBase(args.GetInt(0), args.GetInt(1)));
            }
            break;
        }
        case 12: {
            if (resultOwnerObject == null) {
                HLGraphics.ColorMultiply(args.GetInt(0), args.GetInt(1));
            } else {
                resultOwnerObject.SetInt(resultIndex, HLGraphics.ColorMultiply(args.GetInt(0), args.GetInt(1)));
            }
            break;
        }
        case 13: {
            if (resultOwnerObject == null) {
                HLGraphics.GetBreathColor(args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5), args.GetInt(6), args.GetInt(7));
            } else {
                resultOwnerObject.SetInt(resultIndex, HLGraphics.GetBreathColor(args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5), args.GetInt(6), args.GetInt(7)));
            }
            break;
        }
        case 14: {
            if (resultOwnerObject == null) {
                HLGraphics.GetFontSize();
            } else {
                resultOwnerObject.SetInt(resultIndex, HLGraphics.GetFontSize());
            }
            break;
        }
        case 15: {
            if (resultOwnerObject == null) {
                HLGraphics.StringWidth((HLString)args.GetObject(0));
            } else {
                resultOwnerObject.SetInt(resultIndex, HLGraphics.StringWidth((HLString)args.GetObject(0)));
            }
            break;
        }
        case 16: {
            if (resultOwnerObject == null) {
                HLGraphics.StringHeight();
            } else {
                resultOwnerObject.SetInt(resultIndex, HLGraphics.StringHeight());
            }
            break;
        }
        case 17: {
            HLGraphics.SetHDScale(args.GetInt(0));
            break;
        }
        case 18: {
            HLGraphics.setLinearity(args.GetBoolean(0));
            break;
        }
        }
    }
}
